import { setToken, getToken, delToken } from '@/utils/storage'

export default {
  namespaced: true,
  state: {
    token: getToken(),
    userdata: {}
  },
  getters: {
  },
  mutations: {
    setUserToken (state, data) {
      state.token = data.token
      state.userdata = data
      state.regionId = data.regionId
      setToken(data.token)
    },
    exit (state) {
      state.uesrdata = {}
      delToken()
    }
  },
  actions: {
  },
  modules: {
  }
}
